# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-requests-file
_pyname=requests-file
pkgver=1.5.1
pkgrel=0
pkgdesc="Transport adapter for fetching file:// URLs with the requests python library"
url="https://github.com/dashea/requests-file"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-mock py3-pytest py3-requests"
source="$_pyname-$pkgver.tar.gz::https://github.com/dashea/requests-file/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# tests module needs an __init__ file
	touch tests/__init__.py

	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="821d2c8092b035308d2723b28d0780cb0ae52b1a2856c3399d57357fbc0da4dc3568af67a5910163e86e90bfd6dc8e7195dce3a2adee7a74b228d6dd4b10ae5a  requests-file-1.5.1.tar.gz"
